#include<reg52.h>
#define uchar unsigned char
#define uint unsigned int
uchar a;
bit flag;
void init()
{
	TMOD=0x20;
	TL1=0xFD;
	TH1=0xFD;
	TR1=1;
	EA=1;
	REN=1;
	SM0=0;
	SM1=1;
	ES=1;
}
void main()
{
	init();
	while(1)
	{
	if(RI==1)
	{
	RI=0;
	P1=SBUF;
	}
	}
}

